#include "database/HistoryManager.h"
#include "database/DatabaseManager.h"

HistoryManager::HistoryManager(QObject *parent) : QObject(parent) {}
HistoryManager::~HistoryManager() {}

bool HistoryManager::saveHistory(const QJsonObject &record)
{
    return DatabaseManager::instance().saveObfuscationRecord(record);
}

QJsonArray HistoryManager::loadHistory(int limit)
{
    return DatabaseManager::instance().getObfuscationHistory(limit);
}

bool HistoryManager::clearHistory()
{
    // Clear all obfuscation history via DatabaseManager
    return DatabaseManager::instance().clearObfuscationHistory();
}